Skip to content

feat(card): Google In-App provisioning#25742

Merged
Brunonascdev merged 63 commits into
mainfrom
feat/google-in-app-provisioning
Mar 31, 2026
Merged

feat(card): Google In-App provisioning#25742
Brunonascdev merged 63 commits into
mainfrom
feat/google-in-app-provisioning

Conversation

@Brunonascdev
Copy link
Copy Markdown
Contributor

@Brunonascdev Brunonascdev commented Feb 5, 2026

Description

This PR adds Google Wallet (Android) in-app provisioning support for the MetaMask Card feature. Users can now add their MetaMask Card directly to Google Wallet from within the app.

What is the reason for the change?

Users currently cannot add their MetaMask Card to Google Wallet directly from the app. They need to manually add the card through the Google Wallet app, which provides a suboptimal user experience.

What is the improvement/solution?

  • Implements GoogleWalletAdapter that integrates with the @expensify/react-native-wallet library for Android
  • Updates the providers.ts factory to return GoogleWalletAdapter for Android platform
  • Adds CI/CD pipeline changes to clone the private TapAndPay SDK before Android builds (GitHub Actions and Bitrise)
  • Configures react-native.config.js to conditionally enable the wallet library only when the SDK is present
  • Updates android/build.gradle to include a local Maven repository for the TapAndPay SDK

Changelog

CHANGELOG entry: Added Google Wallet in-app provisioning for MetaMask Card on Android

Related issues

Fixes:

Manual testing steps

Feature: Google Wallet In-App Provisioning

  Scenario: User adds MetaMask Card to Google Wallet
    Given user is logged in and has an active MetaMask Card
    And user is on the Card Home screen on an Android device
    And the "Add to Google Wallet" button is visible

    When user taps on "Add to Google Wallet" button
    Then the Google Wallet provisioning flow is initiated
    And user completes the Google Wallet verification
    And the card is added to Google Wallet
    And a success toast is displayed

  Scenario: User sees disabled button when card is already in wallet
    Given user is logged in and has an active MetaMask Card
    And the card is already added to Google Wallet

    When user navigates to the Card Home screen
    Then the "Add to Google Wallet" button is not visible

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Medium Risk
Introduces new Google Wallet provisioning flow and CI logic to fetch a private Tap-and-Pay SDK, which can affect Android build/release behavior and wallet tokenization edge cases.

Overview
Enables Google Wallet (Android) in-app provisioning for MetaMask Card by adding a new GoogleWalletAdapter (including “Yellow Path” resume handling via token lookup/listing) and exporting it through the push provisioning adapter factory.

Updates Card Home push-provisioning inputs to use a KYC-derived cardholder name (and passes accountCreatedAt), swaps in a new cross-platform AddToWalletButton component (native on iOS, localized SVG button on Android), and adjusts the Galileo adapter contract to return only the opaquePaymentCard needed for Google provisioning.

Adds Android build support for the private Tap-and-Pay SDK: GitHub Actions optionally clones the SDK into android/libs, android/build.gradle adds a local Maven repo, and android/libs is gitignored.

Written by Cursor Bugbot for commit 7273028. This will update automatically on new commits. Configure here.

Brunonascdev and others added 13 commits February 4, 2026 17:44
Add the shared infrastructure for push provisioning cards to mobile wallets.
This base branch contains:

- Core hook (usePushProvisioning) and service (PushProvisioningService)
- Card provider adapters (GalileoCardAdapter for US users)
- Base wallet adapter interfaces and utilities
- Feature flag selectors for both platforms
- CardHome and ReviewOrder UI integration
- Localization strings and analytics events

Platform-specific implementations (GoogleWalletAdapter, AppleWalletAdapter)
are added in separate branches:
- feat/google-in-app-provisioning
- feat/apple-in-app-provisioning

Co-authored-by: Cursor <cursoragent@cursor.com>
Add Google Wallet (Android) support for in-app card provisioning:

- GoogleWalletAdapter for Android push provisioning
- android/build.gradle with maven local repo for TapAndPay SDK
- .gitignore to exclude android/libs directory
- CI/CD changes for TapAndPay SDK setup:
  - GitHub Actions: SSH agent and clone steps for Android builds
  - Bitrise: Clone step in Android build template
- react-native.config.js with conditional SDK detection
…k/metamask-mobile into feat/card-push-provisioning-base
@Brunonascdev Brunonascdev self-assigned this Feb 5, 2026
@Brunonascdev Brunonascdev requested review from a team as code owners February 5, 2026 22:56
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 5, 2026

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-card Card Team label Feb 5, 2026
Comment thread bitrise.yml
Comment thread .github/workflows/build.yml
Comment thread bitrise.yml Outdated
Comment thread app/components/UI/Card/pushProvisioning/adapters/wallet/GoogleWalletAdapter.ts Outdated
@github-actions github-actions Bot added risk-medium Moderate testing recommended · Possible bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Mar 27, 2026
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

activeOpacity={0.8}
testID={testID}
accessibilityRole="button"
accessibilityLabel="Add to Google Wallet"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoded English accessibility label on localized button

Low Severity

The accessibilityLabel is hardcoded as "Add to Google Wallet" in English, while the visible button SVG is locale-aware (rendered via getGoogleWalletButtonSvg with ~60 language variants). Screen reader users in non-English locales hear English even though the visual button is localized. This value needs to go through the strings() i18n function to match the localized SVG.

Fix in Cursor Fix in Web

Copy link
Copy Markdown
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@github-actions github-actions Bot added risk-medium Moderate testing recommended · Possible bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Mar 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
18 value mismatches detected (expected — fixture represents an existing user).
View details

@Brunonascdev Brunonascdev enabled auto-merge March 30, 2026 16:14
@Brunonascdev Brunonascdev added skip-e2e skip E2E test jobs skip-e2e-flakiness-detection Skips the E2E flakiness detection (extra runs on new and modified E2E files) labels Mar 30, 2026
@github-actions github-actions Bot added risk-medium Moderate testing recommended · Possible bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Mar 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeCard, SmokeTrade, SmokeConfirmations
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: medium
  • AI Confidence: 88%
click to see 🤖 AI reasoning details

E2E Test Selection:
The PR introduces significant changes to the MetaMask Card push provisioning feature:

  1. Build infrastructure (.github/workflows/build.yml): Added TapAndPay SDK cloning step for Android builds via SSH key. This is required for the Google Wallet provisioning feature to compile on Android.

  2. New GoogleWalletAdapter: Full implementation of Android Google Wallet provisioning, including Yellow Path (resume) support, token listing, and address mapping.

  3. Custom AddToWalletButton component: Replaces @expensify/react-native-wallet import with a custom implementation that renders locale-aware Google Wallet SVG buttons on Android and uses the native component on iOS.

  4. providers.ts: Now returns GoogleWalletAdapter for Android (previously returned null), meaning push provisioning is now actually enabled on Android.

  5. CardHome.tsx: Uses cardholderName (from KYC) instead of cardDetails.holderName, and passes accountCreatedAt to usePushProvisioning for eligibility checking.

  6. constants.ts: Added isAccountEligibleForProvisioning() with a date cutoff (2025-11-10) - accounts created before this date are ineligible.

  7. PushProvisioningService.ts: Simplified provisioning flow, now handles success directly rather than relying solely on activation listener.

  8. GalileoCardAdapter.ts: Simplified getOpaquePaymentCard() return type.

SmokeCard is the primary tag as these changes directly affect the Card home screen and push provisioning flow. Per SmokeCard's description, SmokeTrade and SmokeConfirmations must also be selected since Add Funds uses swaps requiring transaction confirmations.

No other tags are needed - the changes are isolated to the Card feature area and don't touch shared navigation, browser, or other wallet flows.

Performance Test Selection:
The changes are isolated to the Card push provisioning feature (behind feature flags) and add locale-aware SVG assets for the Google Wallet button. While there are many new SVG files, they are only loaded when the Card feature is active and the AddToWalletButton is rendered. There is no impact on core performance-sensitive flows like app launch, login, account list rendering, or swap flows. No performance tests are warranted.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

@Brunonascdev Brunonascdev added this pull request to the merge queue Mar 30, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 30, 2026
@Brunonascdev Brunonascdev added this pull request to the merge queue Mar 30, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 30, 2026
@Brunonascdev Brunonascdev added this pull request to the merge queue Mar 31, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 31, 2026
@Brunonascdev Brunonascdev added this pull request to the merge queue Mar 31, 2026
Merged via the queue into main with commit 35dbfe1 Mar 31, 2026
215 of 225 checks passed
@Brunonascdev Brunonascdev deleted the feat/google-in-app-provisioning branch March 31, 2026 14:14
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 31, 2026
@weitingsun weitingsun added release-7.73.0 Issue or pull request that will be included in release 7.73.0 and removed release-100.10.0 labels Mar 31, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.73.0 Issue or pull request that will be included in release 7.73.0 risk-medium Moderate testing recommended · Possible bug introduction risk size-XL skip-e2e skip E2E test jobs skip-e2e-flakiness-detection Skips the E2E flakiness detection (extra runs on new and modified E2E files) team-card Card Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants